home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-12-19 | 57.8 KB | 1,573 lines |
- Newsgroups: comp.sources.unix
- From: hammer@cs.purdue.edu (Adam Hammer)
- Subject: v25i085: rcs-5.6 - Revision Control System, V5.6, Part09/11
- Sender: sources-moderator@pa.dec.com
- Approved: vixie@pa.dec.com
-
- Submitted-By: hammer@cs.purdue.edu (Adam Hammer)
- Posting-Number: Volume 25, Issue 85
- Archive-Name: rcs-5.6/part09
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 9 (of 11)."
- # Contents: rcs.ms
- # Wrapped by vixie@cognition.pa.dec.com on Fri Dec 20 16:23:42 1991
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'rcs.ms' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'rcs.ms'\"
- else
- echo shar: Extracting \"'rcs.ms'\" \(56906 characters\)
- sed "s/^X//" >'rcs.ms' <<'END_OF_FILE'
- X.\" Format this file with:
- X.\" pic file | tbl | troff -ms
- X.\"
- X.\" \*s stands for $, and avoids problems when this file is checked in.
- X.ds s $
- X.\" PS and PE center pic diagrams. (The corresponding ms-macros may not.)
- X.de PS
- X.nr pE (\\n(.lu-\\$2u)/2u
- X.in +\\n(pEu
- X.ne \\$1u
- X..
- X.de PE
- X.in -\\n(pEu
- X..
- X.de D(
- X.DS
- X.nr VS 12p
- X.vs 12p
- X.I
- X..
- X.de D)
- X.DE
- X.nr VS 18p
- X.vs 18p
- X.R
- X..
- X.de Id
- X.ND \\$4
- X..
- X.Id $Id: rcs.ms,v 5.2 1991/01/03 10:57:28 eggert Exp $
- X.RP
- X.TL
- RCS\*-A System for Version Control
- X.sp
- X.AU
- Walter F. Tichy
- X.AI
- Department of Computer Sciences
- Purdue University
- West Lafayette, Indiana 47907
- X.sp
- X.AB
- An important problem in program development and maintenance is version control,
- i.e., the task of keeping a software system consisting of many versions and
- configurations well organized.
- The Revision Control System (RCS)
- is a software tool that assists with that task.
- RCS manages revisions of text documents, in particular source programs,
- documentation, and test data.
- It automates the storing, retrieval, logging and identification of revisions,
- and it provides selection mechanisms for composing configurations.
- This paper introduces basic version control concepts and
- discusses the practice of version control
- using RCS.
- XFor conserving space, RCS stores deltas, i.e., differences between
- successive revisions. Several delta storage methods are discussed.
- Usage statistics show that RCS's delta storage method is
- space and time efficient.
- The paper concludes with a detailed survey of version control tools.
- X.sp
- X\fBKeywords\fR: configuration management, history management,
- version control, revisions, deltas.
- X.AE
- X.FS
- An earlier version of this paper was published in
- X.I "Software\*-Practice & Experience"
- X.B 15 ,
- X7 (July 1985), 637-654.
- X.FE
- X.nr VS 18p
- X.LP
- X.NH
- Introduction
- X.PP
- Version control is the task of keeping software
- systems consisting of many versions and configurations well organized.
- The Revision Control System (RCS) is a set of UNIX
- commands that assist with that task.
- X.PP
- RCS' primary function is to manage \fIrevision groups\fR.
- A revision group is a set of text documents, called \fIrevisions\fR,
- that evolved from each other. A new revision is
- created by manually editing an existing one.
- RCS organizes the revisions into an ancestral tree. The initial revision
- is the root of the tree, and the tree edges indicate
- from which revision a given one evolved.
- Besides managing individual revision groups, RCS provides
- flexible selection functions for composing configurations.
- RCS may be combined with MAKE\u1\d,
- resulting in a powerful package for version control.
- X.PP
- RCS also offers facilities for
- merging updates with customer modifications,
- for distributed software development, and
- for automatic identification.
- Identification is the `stamping'
- of revisions and configurations with unique markers.
- These markers are akin to serial numbers,
- telling software maintainers unambiguously which configuration
- is before them.
- X.PP
- RCS is designed for both production and experimental
- environments.
- In production environments,
- access controls detect update conflicts and prevent overlapping changes.
- In experimental environments, where strong controls are
- counterproductive, it is possible to loosen the controls.
- X.PP
- Although RCS was originally intended for programs, it is useful for any
- text that is revised frequently and whose previous revisions must be
- preserved. RCS has been applied successfully to store the source
- text for drawings, VLSI layouts, documentation, specifications,
- test data, form letters and articles.
- X.PP
- This paper discusses the practice of
- version control using RCS.
- It also introduces basic version control concepts,
- useful for clarifying current practice and designing similar systems.
- Revision groups of individual components are treated in the next three sections,
- and the extensions to configurations follow.
- Because of its size, a survey of version control tools
- appears at the end of the paper.
- X.NH
- Getting started with RCS
- X.PP
- Suppose a text file \fIf.c\fR is to be placed under control of RCS.
- Invoking the check-in command
- X.D(
- ci f.c
- X.D)
- creates a new revision group with the contents of
- X\fIf.c\fR as the initial
- revision (numbered 1.1)
- and stores the group into the file \fIf.c,v\fR.
- Unless told otherwise, the command deletes \fIf.c\fR.
- It also asks for a description of the group.
- The description should state the common purpose of all revisions in the group,
- and becomes part of the group's documentation.
- All later check-in commands will ask for a log entry,
- which should summarize the changes made.
- X(The first revision is assigned a default log message,
- which just records the fact that it is the initial revision.)
- X.PP
- XFiles ending in \fI,v\fR
- are called \fIRCS files\fR (\fIv\fR stands for \fIv\fRersions);
- the others are called working files.
- To get back the working file \fIf.c\fR in the previous example,
- execute the check-out command:
- X.D(
- co f.c
- X.D)
- X.R
- This command extracts the latest revision from
- the revision group \fIf.c,v\fR and writes
- it into \fIf.c\fR.
- The file \fIf.c\fR can now be edited and, when finished,
- checked back in with \fIci\fR:
- X.D(
- ci f.c
- X.D)
- X\fICi\fR assigns number 1.2 to
- the new revision.
- If \fIci\fR complains with the message
- X.D(
- ci error: no lock set by <login>
- X.D)
- then the system administrator has decided to configure RCS for a
- production environment by enabling the `strict locking feature'.
- If this feature is enabled, all RCS files are initialized
- such that check-in operations require a lock on the previous revision
- X(the one from which the current one evolved).
- Locking prevents overlapping modifications if several people work on the same file.
- If locking is required, the revision should
- have been locked during the check-out by using
- the option \fI\-l\fR:
- X.D(
- co \-l f.c
- X.D)
- Of course it is too late now for the check-out with locking, because
- X\fIf.c\fR has already been changed; checking out the file again
- would overwrite the modifications.
- X(To prevent accidental overwrites, \fIco\fR senses the presence
- of a working file and asks whether the user really intended to overwrite it.
- The overwriting check-out is sometimes useful for
- backing up to the previous revision.)
- To be able to proceed with the check-in in the present case, first execute
- X.D(
- rcs \-l f.c
- X.D)
- This command retroactively locks the latest revision, unless someone
- else locked it in the meantime. In this case, the two programmers
- involved have to negotiate whose
- modifications should take precedence.
- X.PP
- If an RCS file is private, i.e., if only the owner of the file is expected
- to deposit revisions into it, the strict locking feature is unnecessary and
- may be disabled.
- If strict locking is disabled,
- the owner of the RCS file need not have a lock for check-in.
- XFor safety reasons, all others
- still do. Turning strict locking off and on is done with the commands:
- X.D(
- rcs \-U f.c \fRand\fP rcs \-L f.c
- X.D)
- These commands enable or disable the strict locking feature for each RCS file
- individually.
- The system administrator only decides whether strict locking is
- enabled initially.
- X.PP
- To reduce the clutter in a working directory, all RCS files can be moved
- to a subdirectory with the name \fIRCS\fR.
- RCS commands look first into that directory for RCS files.
- All the commands presented above work
- with the \fIRCS\fR subdirectory without change.\(dg
- X.FS \(dg
- Pairs of RCS and working files can actually be specified in 3 ways:
- a) both are given, b) only the working file is given, c) only the
- RCS file is given.
- If a pair is given, both files may have arbitrary path prefixes;
- RCS commands pair them up intelligently.
- X.FE
- X.PP
- It may be undesirable that \fIci\fR deletes the working file.
- XFor instance, sometimes one would like to save the current revision,
- but continue editing.
- Invoking
- X.D(
- ci \-l f.c
- X.D)
- checks in \fIf.c\fR as usual, but performs an additional
- check-out with locking afterwards. Thus, the working file does
- not disappear after the check-in.
- Similarly, the option
- X\fI\-u\fR does a check-in followed by a check-out without
- locking. This option is useful if the file is needed for compilation after the check-in.
- Both options update the identification markers in the working file
- X(see below).
- X.PP
- Besides the operations \fIci\fR and \fIco\fR, RCS provides the following
- commands:
- X.sp 0
- X.nr VS 12p
- X.vs 12p
- X.TS
- tab(%);
- li l.
- ident%extract identification markers
- rcs%change RCS file attributes
- rcsclean%remove unchanged working files (optional)
- rcsdiff%compare revisions
- rcsfreeze%record a configuration (optional)
- rcsmerge%merge revisions
- rlog%read log messages and other information in RCS files
- X.TE
- A synopsis of these commands appears in the Appendix.
- X.NH 2
- Automatic Identification
- X.PP
- RCS can stamp source and object code with special identification strings,
- similar to product and serial numbers.
- To obtain such identification, place the marker
- X.D(
- X\*sId\*s
- X.D)
- into the text of a revision, for instance inside a comment.
- The check-out operation will replace this marker with a string of the form
- X.D(
- X\*sId: filename revisionnumber date time author state locker \*s
- X.D)
- This string need never be touched, because \fIco\fR keeps it
- up to date automatically.
- To propagate the marker into object code, simply put
- it into a literal character string. In C, this is done as follows:
- X.D(
- static char rcsid[] = \&"\*sId\*s\&";
- X.D)
- The command \fIident\fR extracts such markers from any file, in particular from
- object code.
- X\fIIdent\fR helps to find out
- which revisions of which modules were used in a given program.
- It returns a complete and unambiguous component list,
- from which a copy of the program can be reconstructed.
- This facility is invaluable for program maintenance.
- X.PP
- There are several additional identification markers, one for each component
- of \*sId\*s.
- The marker
- X.D(
- X\*sLog\*s
- X.D)
- has a similar function. It accumulates
- the log messages that are requested during check-in.
- Thus, one can maintain the complete history of a revision directly inside it,
- by enclosing it in a comment.
- XFigure 1 is a partial reproduction of a log contained in revision 4.1 of
- the file \fIci.c\fR. The log appears at the beginning of the file,
- and makes it easy to determine what the recent modifications were.
- X.sp
- X.nr VS 12p
- X.vs 12p
- X.ne 18
- X.nf
- X.in +0.5i
- X/* \*sLog: ci.c,v \*s
- X * Revision 4.1 1983/05/10 17:03:06 wft
- X * Added option \-d and \-w, and updated assignment of date, etc. to new delta.
- X * Added handling of default branches.
- X *
- X * Revision 3.9 1983/02/15 15:25:44 wft
- X * Added call to fastcopy() to copy remainder of RCS file.
- X *
- X * Revision 3.8 1983/01/14 15:34:05 wft
- X * Added ignoring of interrupts while new RCS file is renamed;
- X * avoids deletion of RCS files by interrupts.
- X *
- X * Revision 3.7 1982/12/10 16:09:20 wft
- X * Corrected checking of return code from diff.
- X * An RCS file now inherits its mode during the first ci from the working file,
- X * except that write permission is removed.
- X */
- X.in 0
- X.ce 1
- XFigure 1. Log entries produced by the marker \*sLog\*s.
- X.fi
- X.nr VS 18p
- X.vs 18p
- X.sp 0
- X.LP
- Since revisions are stored in the form of differences,
- each log message is
- physically stored once,
- independent of the number of revisions present.
- Thus, the \*sLog\*s marker incurs negligible space overhead.
- X.NH
- The RCS Revision Tree
- X.PP
- RCS arranges revisions in an ancestral tree.
- The \fIci\fR command builds this tree; the auxiliary command \fIrcs\fR
- prunes it.
- The tree has a root revision, normally numbered 1.1, and successive revisions
- are numbered 1.2, 1.3, etc. The first field of a revision number
- is called the \fIrelease number\fR and the second one
- the \fIlevel number\fR. Unless given explicitly,
- the \fIci\fR command assigns a new revision number
- by incrementing the level number of the previous revision.
- The release number must be incremented explicitly, using the
- X\fI\-r\fR option of \fIci\fR.
- Assuming there are revisions 1.1, 1.2, and 1.3 in the RCS file f.c,v, the command
- X.D(
- ci \-r2.1 f.c \fRor\fP ci \-r2 f.c
- X.D)
- assigns the number 2.1 to the new revision.
- Later check-ins without the \fI\-r\fR option will assign the numbers 2.2, 2.3,
- and so on.
- The release number should be incremented only at major transition points
- in the development, for instance when a new release of a software product has
- been completed.
- X.NH 2
- When are branches needed?
- X.PP
- A young revision tree is slender:
- It consists of only one branch, called the trunk.
- As the tree ages, side branches may form.
- Branches are needed in the following 4 situations.
- X.IP "\fITemporary fixes\fR"
- X.sp 0
- Suppose a tree has 5 revisions grouped in 2 releases,
- as illustrated in Figure 2.
- Revision 1.3, the last one of release 1, is in operation at customer sites,
- while release 2 is in active development.
- X.ne 4
- X.PS 4i
- X.ps -2
- box "1.1"
- arrow
- box "1.2"
- arrow
- box "1.3"
- arrow
- box "2.1"
- arrow
- box "2.2"
- arrow dashed
- X.ps +2
- X.PE
- X.ce 1
- XFigure 2. A slender revision tree.
- X.sp 0
- Now imagine a customer requesting a fix of
- a problem in revision 1.3, although actual development has moved on
- to release 2. RCS does not permit an extra
- revision to be spliced in between 1.3 and 2.1, since that would not reflect
- the actual development history. Instead, create a branch
- at revision 1.3, and check in the fix on that branch.
- The first branch starting at 1.3 has number 1.3.1, and
- the revisions on that branch are numbered 1.3.1.1, 1.3.1.2, etc.
- The double numbering is needed to allow for another
- branch at 1.3, say 1.3.2.
- Revisions on the second branch would be numbered
- X1.3.2.1, 1.3.2.2, and so on.
- The following steps create
- branch 1.3.1 and add revision 1.3.1.1:
- X.sp 0
- X.I
- X.nr VS 12p
- X.vs 12p
- X.TS
- tab(%);
- l l l.
- X %co \-r1.3 f.c% \*- check out revision 1.3
- X %edit f.c% \*- change it
- X %ci \-r1.3.1 f.c% \*- check it in on branch 1.3.1
- X.TE
- X.nr VS 18p
- X.vs 18p
- X.R
- This sequence of commands transforms the tree of Figure 2 into
- the one in Figure 3.
- Note that it may be necessary to incorporate the differences
- between 1.3 and 1.3.1.1
- into a revision at level 2. The operation \fIrcsmerge\fR automates this
- process (see the Appendix).
- X.ne 7
- X.PS 4i
- X.ps -2
- X box "1.1"
- X arrow
- X box "1.2"
- X arrow
- R13: box "1.3"
- X arrow
- R21: box "2.1"
- X arrow
- R22: box "2.2"
- X arrow dashed
- X line invis down from R21.s
- RB1: box "1.3.1.1"
- X arrow dashed right from RB1.e
- X arrow from R13.s to RB1.w
- X.ps +2
- X.PE
- X.ce 1
- XFigure 3. A revision tree with one side branch
- X.sp
- X.IP "\fIDistributed development and customer modifications\fR"
- X.sp 0
- Assume a situation as in Figure 2, where revision 1.3 is in operation
- at several customer sites,
- while release 2 is in development.
- Customer sites should use RCS to store the distributed software.
- However, customer modifications should not be placed on the same branch
- as the distributed source; instead, they should be placed on a side branch.
- When the next software distribution arrives,
- it should be appended to the trunk of
- the customer's RCS file, and the customer
- can then merge the local modifications back into the new release.
- In the above example, a
- customer's RCS file would contain the following tree, assuming
- that the customer has received revision 1.3, added his local modifications
- as revision 1.3.1.1, then received revision 2.4, and merged
- X2.4 and 1.3.1.1, resulting in 2.4.1.1.
- X.ne 7
- X.PS 4i
- X.ps -2
- R13: box "1.3"
- X line invis
- R21: box invis
- X line invis
- R22: box invis
- X line invis
- R24: box "2.4"
- X line invis
- R25: box invis
- X line invis
- X arrow from R13.e to R24.w
- X line invis down from R21.s
- RB1: box "1.3.1.1"
- X arrow from R13.s to RB1.w
- X right
- X line invis down from R25.s
- RB2: box "2.4.1.1"
- X arrow from R24.s to RB2.w
- X.ps +2
- X.PE
- X.ce 1
- XFigure 4. A customer's revision tree with local modifications.
- X.sp 1
- This approach is actually practiced in the CSNET project,
- where several universities and a company cooperate
- in developing a national computer network.
- X.IP "\fIParallel development\fR"
- X.sp 0
- Sometimes it is desirable to explore an alternate design or
- a different implementation technique in parallel with the
- main line development. Such development
- should be carried out on a side branch.
- The experimental changes may later be moved into the main line, or abandoned.
- X.IP "\fIConflicting updates\fR"
- X.sp 0
- A common occurrence is that one programmer
- has checked out a revision, but cannot complete the assignment
- for some reason. In the meantime, another person
- must perform another modification
- immediately. In that case, the second person should check-out the same revision,
- modify it, and check it in on a side branch, for later merging.
- X.PP
- XEvery node in a revision tree consists of the following attributes:
- a revision number, a check-in date and time, the author's identification,
- a log entry, a state and the actual text. All these attributes
- are determined at the time the revision is checked in.
- The state attribute indicates the status of a revision.
- It is set automatically to `experimental' during check-in.
- A revision can later be promoted to a higher status, for example
- X`stable' or `released'. The set of states is user-defined.
- X.NH 2
- Revisions are represented as deltas
- X.PP
- XFor conserving space, RCS stores revisions in the form
- of deltas, i.e., as differences between revisions.
- The user interface completely hides this fact.
- X.PP
- A delta is a sequence of edit commands that transforms one string
- into another. The deltas employed by RCS are line-based, which means
- that the only edit commands allowed are insertion and deletion of lines.
- If a single character in a line is changed, the
- edit scripts consider the entire line changed.
- The program \fIdiff\fR\u2\d
- produces a small, line-based delta between pairs of text files.
- A character-based edit script would take much longer to compute,
- and would not be significantly shorter.
- X.PP
- Using deltas is a classical space-time tradeoff: deltas reduce the
- space consumed, but increase access time.
- However, a version control tool should impose as little delay
- as possible on programmers.
- XExcessive delays discourage the use of version controls,
- or induce programmers to take shortcuts that compromise system integrity.
- To gain reasonably fast access time for both editing and compiling,
- RCS arranges deltas in the following way.
- The most recent revision on the trunk is stored intact.
- All other revisions on the trunk are stored as reverse deltas.
- A reverse delta describes how to go backward in the development history:
- it produces the desired revision if applied to the successor of that revision.
- This implementation has the advantage
- that extraction of the latest revision is a simple and fast copy
- operation.
- Adding a new revision to the trunk is also fast: \fIci\fR simply
- adds the new revision intact, replaces the previous
- revision with a reverse delta, and keeps the rest of the old deltas.
- Thus, \fIci\fR requires the computation
- of only one new delta.
- X.PP
- Branches need special treatment. The naive solution would be to
- store complete copies for the tips of all branches.
- Clearly, this approach would cost too much space. Instead,
- RCS uses \fIforward\fR deltas for branches. Regenerating a revision
- on a side branch proceeds as follows. First, extract the latest revision
- on the trunk; secondly, apply reverse deltas until the fork revision for
- the branch is obtained; thirdly, apply forward deltas until the desired
- branch revision is reached. Figure 5 illustrates a tree with
- one side branch. Triangles pointing to the left and right represent
- reverse and forward deltas, respectively.
- X.ne 8
- X.PS 4i
- X.ps -2
- define BD X [line invis $1 right .5;
- line up .3 then left .5 down .3 then right .5 down .3 then up .3] X
- X
- define FD X [line invis $1 right .5;
- line left .5 down .3 then up .6 then right .5 down .3;] X
- X
- right
- D11: BD(" 1.1")
- X arrow right from D11.e
- D12: BD(" 1.2")
- X arrow right from D12.e
- D13: BD(" 1.3")
- X arrow right from D13.e
- D21: BD(" 2.1")
- X arrow right from D21.e
- D22: box "2.2"
- X line invis down from D21.s
- XF1: FD("1.3.1.1 ")
- X arrow from D13.se to F1.w
- X arrow from F1.e right
- X right
- XF2: FD("1.3.1.2 ")
- X.ps +2
- X.PE
- X.ce 1
- XFigure 5. A revision tree with reverse and forward deltas.
- X.sp 0
- X.PP
- Although implementing fast check-out for the latest trunk revision,
- this arrangement has the disadvantage that generation of other revisions
- takes time proportional to the number of deltas applied. For example,
- regenerating the branch tip in Figure 5 requires application of five
- deltas (including the initial one). Since usage statistics show that
- the latest trunk revision is the one that is retrieved in 95 per cent
- of all cases (see the section on usage statistics), biasing check-out time
- in favor of that revision results in significant savings.
- However, careful implementation of the delta application process is
- necessary to provide low retrieval overhead for other revisions, in
- particular for branch tips.
- X.PP
- There are several techniques for delta application.
- The naive one is to pass each delta to a general-purpose text editor.
- A prototype of RCS invoked the UNIX editor \fIed\fR both
- for applying deltas and for expanding the identification markers.
- Although easy to implement, performance was poor, owing to the
- high start-up costs and excess generality of \fIed\fR. An intermediate
- version of RCS used a special-purpose, stream-oriented editor.
- This technique reduced the cost of applying a delta to the cost of
- checking out the latest trunk revision. The reason for this behavior
- is that each delta application involves a complete pass over
- the preceding revision.
- X.PP
- However, there is a much better algorithm. Note that the deltas are
- line oriented and that most of the work of a stream editor involves
- copying unchanged lines from one revision to the next. A faster
- algorithm avoids unnecessary copying of character strings by using
- a \fIpiece table\fR.
- A piece table is a one-dimensional array, specifying how a given
- revision is `pieced together' from lines in the RCS file.
- Suppose piece table \fIPT\dr\u\fR represents revision \fIr\fR.
- Then \fIPT\dr\u[i]\fR contains the starting position of line \fIi\fR
- of revision \fIr\fR.
- Application of the next delta transforms piece table \fIPT\dr\u\fR
- into \fIPT\dr+1\u\fR. For instance, a delete command removes a
- series of entries from the piece table. An insertion command inserts
- new entries, moving the entries following the insertion point further down the
- array. The inserted entries point to the text lines in the delta.
- Thus, no I/O is involved except for reading the delta itself. When all
- deltas have been applied to the piece table, a sequential pass
- through the table looks up each line in the RCS file and copies it to
- the output file, updating identification markers at the same time.
- Of course, the RCS file must permit random access, since the copied
- lines are scattered throughout that file. Figure 6 illustrates an
- RCS file with two revisions and the corresponding piece tables.
- X.ne 13
- X.sp 6
- X.ce 1
- X\fIFigure 6 is not available.\fP
- X.sp 5
- X.ce 1
- XFigure 6. An RCS file and its piece tables
- X.sp 0
- X.PP
- The piece table approach has the property that the time for applying a single
- delta is roughly determined by the size of the delta, and not by the
- size of the revision. For example, if a delta is
- X10 per cent of the size of a revision, then applying it takes only
- X10 per cent of the time to generate the latest trunk revision. (The stream
- editor would take 100 per cent.)
- X.PP
- There is an important alternative for representing deltas that affects
- performance. SCCS\u3\d,
- a precursor of RCS, uses \fIinterleaved\fR deltas.
- A file containing interleaved deltas is partitioned into blocks of lines.
- XEach block has a header that specifies to which revision(s) the block
- belongs. The blocks are sorted out in such a way that a single
- pass over the file can pick up all the lines belonging to a given
- revision. Thus, the regeneration time for all revisions is the same:
- all headers must be inspected, and the associated blocks either copied
- or skipped. As the number of revisions increases, the cost of retrieving
- any revision is much higher than the cost of checking out the
- latest trunk revision with reverse deltas. A detailed comparison
- of SCCS's interleaved deltas and RCS's reverse deltas can be found
- in Reference 4.
- This reference considers the version of RCS with the
- stream editor only. The piece table method improves performance
- further, so that RCS is always faster than SCCS, except if 10
- or more deltas are applied.
- X.PP
- Additional speed-up for both delta methods can be obtained by caching
- the most recently generated revision, as has been implemented in DSEE.\u5\d
- With caching, access time to frequently used revisions can approach normal file
- access time, at the cost of some additional space.
- X.NH
- Locking: A Controversial Issue
- X.PP
- The locking mechanism for RCS was difficult to design.
- The problem and its solution are first presented in their `pure' form,
- followed by a discussion of the complications
- caused by `real-world' considerations.
- X.PP
- RCS must prevent two or more persons from depositing competing changes of the
- same revision.
- Suppose two programmers check out revision 2.4 and
- modify it. Programmer A checks in a revision before programmer B\&.
- Unfortunately, programmer B has not seen A's
- changes, so the effect is that A's changes are covered up by B's deposit.
- A's changes are not lost since all revisions
- are saved, but they are confined to a single revision.\(dd
- X.FS \(dd
- Note that this problem is entirely different from the atomicity problem.
- Atomicity means that
- concurrent update operations on the same RCS file cannot be permitted,
- because that may result in inconsistent data.
- Atomic updates are essential (and implemented in RCS),
- but do not solve the conflict discussed here.
- X.FE
- X.PP
- This conflict is prevented in RCS by locking.
- Whenever someone intends to edit a revision (as opposed
- to reading or compiling it), the revision should be checked out
- and locked,
- using the \fI\-l\fR option on \fIco\fR. On subsequent check-in,
- X\fIci\fR tests the lock and then removes it.
- At most one programmer at a time may
- lock a particular revision, and only this programmer may check in
- the succeeding revision.
- Thus, while a revision is locked, it is the exclusive responsibility
- of the locker.
- X.PP
- An important maxim for software tools like RCS is that they must
- not stand in the way of making progress with a project.
- This consideration leads to several weakenings of the locking mechanism.
- XFirst of all, even if a revision is locked, it can
- still be checked out. This is necessary if other people
- wish to compile or inspect the locked revision
- while the next one is in preparation. The only operations they
- cannot do are to lock the revision or to check in the succeeding one. Secondly,
- check-in operations on other branches in the RCS file are still possible; the
- locking of one revision does not affect any other revision.
- Thirdly, revisions are occasionally locked for a long period of time
- because a programmer is absent or otherwise unable to complete
- the assignment. If another programmer has to make a pressing change,
- there are the following three alternatives for making progress:
- a) find out who is holding the lock and ask that person to release it;
- b) check out the locked revision, modify it, check it
- in on a branch, and merge the changes later;
- c) break the lock. Breaking a lock leaves a highly visible
- trace, namely an electronic mail message that is sent automatically to the
- holder of the lock, recording the breaker and a commentary requested from him.
- Thus, breaking locks is tolerated under certain circumstances,
- but will not go unnoticed.
- XExperience has shown that the automatic mail message attaches a high enough
- stigma to lock breaking,
- such that programmers break locks only in real emergencies,
- or when a co-worker resigns and leaves locked revisions behind.
- X.PP
- If an RCS file is private, i.e., when a programmer owns an RCS file
- and does not expect anyone else to perform check-in operations,
- locking is an unnecessary nuisance.
- In this case,
- the `strict locking feature' discussed earlier may be disabled,
- provided that file protection
- is set such that only the owner may write the RCS file.
- This has the effect that only the owner can check-in revisions,
- and that no lock is needed for doing so.
- X.PP
- As added protection,
- each RCS file contains an access list that specifies the users
- who may execute update operations. If an access list is empty,
- only normal UNIX file protection applies. Thus, the access list is
- useful for restricting the set of people who would otherwise have update
- permission. Just as with locking, the access list
- has no effect on read-only operations such as \fIco\fR. This approach
- is consistent with the UNIX philosophy of openness, which contributes
- to a productive software development environment.
- X.NH
- Configuration Management
- X.PP
- The preceding sections described how RCS deals with revisions of individual
- components; this section discusses how to handle configurations.
- A configuration is a set of revisions, where each revision comes
- from a different revision group, and the revisions are selected
- according to a certain criterion.
- XFor example,
- in order to build a functioning compiler, the `right'
- revisions from the scanner, the parser, the optimizer
- and the code generator must be combined.
- RCS, in conjunction with MAKE,
- provides a number of facilities to effect a smooth selection.
- X.NH 2
- RCS Selection Functions
- X.PP
- X.IP "\fIDefault selection\fR"
- X.sp 0
- During development, the usual selection criterion is to choose
- the latest revision of all components. The \fIco\fR command
- makes this selection by default. For example, the command
- X.D(
- co *,v
- X.D)
- retrieves the latest revision on the default branch of each RCS file
- in the current directory.
- The default branch is usually the trunk, but may be
- set to be a side branch.
- Side branches as defaults are needed in distributed software development,
- as discussed in the section on the RCS revision tree.
- X.sp
- X.IP "\fIRelease based selection\fR"
- X.sp 0
- Specifying a release or branch number selects the latest revision in
- that release or branch.
- XFor instance,
- X.D(
- co \-r2 *,v
- X.D)
- retrieves the latest revision with release number 2 from each RCS file.
- This selection is convenient if a release has been completed and
- development has moved on to the next release.
- X.sp
- X.IP "\fIState and author based selection\fR"
- X.sp 0
- If the highest level number within a given release number
- is not the desired one,
- the state attribute can help. For example,
- X.D(
- co \-r2 \-sReleased *,v
- X.D)
- retrieves the latest revision with release number 2 whose state attribute
- is `Released'.
- Of course, the state attribute has to be set appropriately, using the
- X\fIci\fR or \fIrcs\fR commands.
- Another alternative is to select a revision by its author,
- using the \fI\-w\fR option.
- X.sp
- X.IP "\fIDate based selection\fR"
- X.sp 0
- Revisions may also be selected by date.
- Suppose a release of an entire system was
- completed and current on March 4, at 1:00 p.m. local time. Then the command
- X.D(
- co \-d'March 4, 1:00 pm LT' *,v
- X.D)
- checks out all the components of that release, independent of the numbering.
- The \fI\-d\fR option specifies a `cutoff date', i.e.,
- the revision selected has a check-in date that
- is closest to, but not after the date given.
- X.IP "\fIName based selection\fR"
- X.sp 0
- The most powerful selection function is based on assigning symbolic
- names to revisions and branches.
- In large systems, a single release number or date is not sufficient
- to collect the appropriate revisions from all groups.
- XFor example, suppose one wishes to combine release 2
- of one subsystem and release 15 of another.
- Most likely, the creation dates of those releases differ also.
- Thus, a single revision number or date passed to the \fIco\fR command
- will not suffice to select the right revisions.
- Symbolic revision numbers solve this problem.
- XEach RCS file may contain a set of symbolic names that are mapped
- to numeric revision numbers. For example, assume
- the symbol \fIV3\fR is bound to release number 2 in file \fIs,v\fR, and to
- revision number 15.9 in \fIt,v\fR.
- Then the single command
- X.D(
- co \-rV3 s,v t,v
- X.D)
- retrieves the latest revision of release 2 from \fIs,v\fR,
- and revision 15.9 from \fIt,v\fR.
- In a large system with many modules, checking out all
- revisions with one command greatly simplifies configuration management.
- X.PP
- Judicious use of symbolic revision numbers helps with organizing
- large configurations.
- A special command, \fIrcsfreeze\fR,
- assigns a symbolic revision number to a selected revision
- in every RCS file.
- X\fIRcsfreeze\fR effectively freezes a configuration.
- The assigned symbolic revision number selects all components
- of the configuration.
- If necessary, symbolic numbers
- may even be intermixed with numeric ones. Thus, \fIV3.5\fR in the
- above example
- would select revision 2.5 in \fIs,v\fR and branch 15.9.5 in \fIt,v\fR.
- X.PP
- The options \fI\-r\fR, \fI\-s\fR, \fI\-w\fR and \fI\-d\fR
- may be combined. If a branch is given, the latest revision
- on that branch satisfying all conditions is retrieved;
- otherwise, the default branch is used.
- X.NH 2
- Combining MAKE and RCS
- X.PP
- MAKE\u1\d
- is a program that processes configurations.
- It is driven by configuration specifications
- recorded in a special file, called a `Makefile'.
- MAKE avoids redundant processing steps
- by comparing creation dates of source and processed objects.
- XFor example, when instructed to compile all
- modules of a given system, it only recompiles
- those source modules that were changed
- since they were processed last.
- X.PP
- MAKE has been extended with an auto-checkout feature for RCS.*
- X.FS *
- This auto-checkout extension is available only in some versions of MAKE,
- e.g. GNU MAKE.
- X.FE
- When a certain file to be processed is not present,
- MAKE attempts a check-out operation.
- If successful, MAKE performs the required processing, and then deletes
- the checked out file to conserve space.
- The selection parameters discussed above can be passed to MAKE
- either as parameters, or directly embedded in the Makefile.
- MAKE has also been extended to search the subdirectory named \fIRCS\fR
- for needed files, rather than just the current working directory.
- However, if a working file is present, MAKE totally ignores the corresponding
- RCS file and uses the working file.
- X(In newer versions of MAKE distributed by AT&T and others,
- auto-checkout can be
- achieved with the rule DEFAULT, instead of a special extension of MAKE.
- However, a file checked out by the rule DEFAULT
- will not be deleted after processing. \fIRcsclean\fR can be
- used for that purpose.)
- X.PP
- With auto-checkout, RCS/MAKE can effect a selection rule
- especially tuned for multi-person software development and maintenance.
- In these situations,
- programmers should obtain configurations that consist of
- the revisions they have personally checked out plus the latest
- checked in revision of all other revision groups.
- This schema can be set up as follows.
- X.PP
- XEach programmer chooses a working directory
- and places into it a symbolic link, named \fIRCS\fR,
- to the directory containing the relevant RCS files.
- The symbolic link makes sure that \fIco\fR and \fIci\fR
- operations need only specify the working files, and that
- the Makefile need not be changed.
- The programmer then checks out the needed files and modifies them.
- If MAKE is invoked,
- it composes configurations by selecting those
- revisions that are checked out, and the rest from the
- subdirectory \fIRCS\fR.
- The latter selection may be controlled by a symbolic
- revision number or any of the other selection criteria.
- If there are several programmers editing in separate working directories,
- they are insulated from each other's changes until checking in their
- modifications.
- X.PP
- Similarly, a maintainer can recreate an older configuration
- by starting to work in an empty working directory.
- During the initial MAKE invocation, all revisions are selected from RCS files.
- As the maintainer checks out files and modifies them,
- a new configuration is gradually built up.
- XEvery time MAKE is invoked, it substitutes the modified revisions
- into the configuration being manipulated.
- X.PP
- A final application of RCS is to use it for storing Makefiles.
- Revision groups of Makefiles represent
- multiple versions of configurations.
- Whenever a configuration is baselined or distributed,
- the best approach is to unambiguously fix
- the configuration with a symbolic revision number by calling
- X\fIrcsfreeze\fR,
- to embed that symbol into the Makefile, and to
- check in the Makefile (using the same symbolic revision number).
- With this approach, old configurations
- can be regenerated easily and reliably.
- X.NH
- Usage Statistics
- X.PP
- The following usage statistics were collected on two DEC VAX-11/780
- computers of the Purdue Computer Science Department. Both machines
- are mainly used for research purposes. Thus, the data
- reflect an environment in which the majority of projects
- involve prototyping and advanced software development,
- but relatively little long-term maintenance.
- X.PP
- XFor the first experiment,
- the \fIci\fR and \fIco\fR operations were instrumented
- to log the number of backward and forward deltas applied.
- The data were collected during a 13 month period
- from Dec. 1982 to Dec. 1983.
- Table I summarizes the results.
- X.sp 0
- X.nr VS 12p
- X.vs 12p
- X.TS
- center,box,tab(#);
- c|c|c|c|c s|c s
- c|c|c|c|c s|c s
- l|n|n|n|n n|n n.
- Operation#Total#Total deltas#Mean deltas#Operations#Branch
- X #operations #applied#applied#with >1 delta#operations
- X_
- co # 7867# 9320#1.18#509#(6%)#203#(3%)
- ci # 3468# 2207#0.64# 85#(2%)# 75#(2%)
- ci & co#11335#11527#1.02#594#(5%)#278#(2%)
- X.TE
- X.ce 1
- Table I. Statistics for \fIco\fR and \fIci\fR operations.
- X.nr VS 18p
- X.vs 18p
- X.PP
- The first two lines show statistics for check-out and check-in;
- the third line shows the combination.
- Recall that \fIci\fR performs an implicit check-out to obtain
- a revision for computing the delta.
- In all measures presented, the most recent revision (stored intact)
- counts as one delta. The number of deltas applied represents
- the number of passes necessary, where the first `pass' is a copying step.
- X.PP
- Note that the check-out operation is executed more than
- twice as frequently as the check-in operation.
- The fourth column gives the mean number of deltas
- applied in all three cases.
- XFor \fIci\fR, the mean number of deltas applied is less
- than one.
- The reasons are that the initial check-in requires no delta at all, and that
- the only time \fIci\fR requires more than one delta is for branches.
- Column 5 shows the actual number of operations that applied more than one
- delta.
- The last column indicates that branches were not used often.
- X.PP
- The last three columns demonstrate that the most recent trunk revision
- is by far the most frequently accessed.
- XFor RCS, check-out of
- this revision is a simple copy operation, which is the absolute minimum
- given the copy-semantics of \fIco\fR.
- Access to older revisions and branches
- is more common in non-academic environments,
- yet even if access to older deltas were an order
- of magnitude more frequent,
- the combined average number of deltas applied would still be below 1.2.
- Since RCS is faster than SCCS until up to 10 delta applications,
- reverse deltas are clearly the method of choice.
- X.PP
- The second experiment, conducted in March of 1984,
- involved surveying the existing RCS files
- on our two machines. The goal was to determine the mean number of
- revisions per RCS file, as well as the space consumed by them.
- Table II shows the results. (Tables I and II were produced at different
- times and are unrelated.)
- X.sp 0
- X.nr VS 12p
- X.vs 12p
- X.TS
- center,box,tab(#);
- c | c | c | c | c | c | c
- c | c | c | c | c | c | c
- l | n | n | n | n | n | n.
- X #Total RCS#Total#Mean#Mean size of#Mean size of#Overhead
- X #files#revisions#revisions#RCS files#revisions
- X_
- All files #8033#11133#1.39#6156#5585#1.10
- XFiles with#1477# 4578#3.10#8074#6041#1.34
- X\(>= 2 deltas
- X.TE
- X.ce 1
- Table II. Statistics for RCS files.
- X.nr VS 18p
- X.vs 18p
- X.PP
- The mean number of revisions per RCS file is 1.39.
- Columns 5 and 6 show the mean sizes (in bytes) of an RCS file
- and of the latest revision of each RCS file, respectively.
- The `overhead' column contains the ratio of the mean sizes.
- Assuming that all revisions in an RCS file are approximately the same size,
- this ratio gives a measure of the space consumed by the extra revisions.
- X.PP
- In our sample, over 80 per cent of the RCS files contained only a single revision.
- The reason is that our
- systems programmers routinely check in all source files
- on the distribution tapes, even though they may never touch them again.
- To get a better indication of how much space savings are possible
- with deltas, all measures with those files
- that contained 2 or more revisions were recomputed. Only for those files
- is RCS necessary.
- As shown in the second line, the average number of revisions for those files is
- X3.10, with an overhead of 1.34. This means that the extra 2.10 deltas
- require 34 per cent extra space, or
- X16 per cent per extra revision.
- Rochkind\u3\d
- measured the space consumed by SCCS, and
- reported an average of 5 revisions per group
- and an overhead of 1.37 (or about 9 per cent per extra revision).
- In a later paper, Glasser\u6\d
- observed an average of 7 revisions per group in a single, large project,
- but provided no overhead figure.
- In his paper on DSEE\u5\d,
- Leblang reported that delta storage combined with blank compression
- results in an overhead of a mere 1\-2 per cent per revision.
- Since leading blanks accounted for about 20 per cent of the surveyed Pascal
- programs, a revision group with 5\-10 members was smaller
- than a single cleartext copy.
- X.PP
- The above observations demonstrate clearly that the space needed
- for extra revisions is small. With delta storage, the luxury of
- keeping multiple revisions online is certainly affordable.
- In fact, introducing a system with delta storage may reduce
- storage requirements, because programmers often save back-up copies
- anyway. Since back-up copies are stored much more efficiently with deltas,
- introducing a system such as RCS may
- actually free a considerable amount of space.
- X.NH
- Survey of Version Control Tools
- X.PP
- The need to keep back-up copies of software arose when
- programs and data were no longer stored on paper media, but were entered
- from terminals and stored on disk.
- Back-up copies are desirable for reliability, and many modern editors
- automatically save a back-up copy for every file touched.
- This strategy
- is valuable for short-term back-ups, but not suitable for long-term
- version control, since an existing back-up copy is overwritten whenever the
- corresponding file is edited.
- X.PP
- Tape archives are suitable for long-term, offline storage.
- If all changed files are dumped on a back-up tape once per day, old revisions
- remain accessible. However, tape archives are unsatisfactory
- for version control in several ways. First, backing up the file
- system every 24 hours does not capture intermediate revisions.
- Secondly, the old revisions are not online,
- and accessing them is tedious and time-consuming.
- In particular, it is impractical to
- compare several old revisions of a group,
- because that may require mounting and searching several tapes.
- Tape archives are important fail-safe tools in the
- event of catastrophic disk failures or accidental deletions,
- but they are ill-suited for version control.
- Conversely, version control tools do not obviate the
- need for tape archives.
- X.PP
- A natural technique for keeping several old revisions online is
- to never delete a file.
- XEditing a file
- simply creates a new file with the same
- name, but with a different sequence number.
- This technique, available as an option in DEC's VMS operating system,
- turns out to be inadequate for version control.
- XFirst, it is prohibitively expensive in terms of storage costs,
- especially since no data compression techniques are employed.
- Secondly, indiscriminately storing every change produces too many
- revisions, and programmers have difficulties distinguishing them.
- The proliferation of revisions forces programmers to spend much time on
- finding and deleting useless files.
- Thirdly, most of the support functions like locking, logging,
- revision selection,
- and identification described in this paper are not available.
- X.PP
- An alternative approach is to separate editing from revision control.
- The user may repeatedly edit a given revision,
- until freezing it with an explicit command.
- Once a revision is frozen, it is stored permanently and can no longer be modified.
- X(In RCS, freezing a revisions is done with \fIci\fR.)
- XEditing a frozen revision implicitly creates a new one, which
- can again be changed repeatedly until it is frozen itself.
- This approach saves exactly those revisions that the user
- considers important, and keeps the number of revisions manageable.
- IBM's CLEAR/CASTER\u7\d,
- AT&T's SCCS\u3\d,
- CMU's SDC\u8\d
- and DEC's CMS\u9\d,
- are examples of version control systems using this approach.
- CLEAR/CASTER maintains a data base of programs, specifications,
- documentation and messages, using deltas.
- Its goal is to provide control over the development process from a
- management viewpoint.
- SCCS stores multiple revisions of source text in an ancestral tree,
- records a log entry for each revision,
- provides access control, and has facilities
- for uniquely identifying each revision.
- An efficient delta technique
- reduces the space consumed by each revision group.
- SDC is much simpler than SCCS because it stores not more than
- two revisions. However, it maintains a complete log for all old
- revisions, some of which may be on back-up tape.
- CMS, like SCCS, manages tree-structured revision groups,
- but offers no identification mechanism.
- X.PP
- Tools for dealing with configurations are still in a state of flux.
- SCCS, SDC and CMS can be combined with MAKE or MAKE-like programs.
- Since flexible selection rules are missing from all these tools,
- it is sometimes difficult
- to specify precisely which revision of each group
- should be passed to MAKE for building a desired configuration.
- The Xerox Cedar system\u10\d
- provides a `System Modeller' that can rebuild
- a configuration from an arbitrary set of module revisions.
- The revisions of a module are only distinguished by creation time,
- and there is no tool for managing groups.
- Since the selection rules are primitive,
- the System Modeller appears to be somewhat tedious to use.
- Apollo's DSEE\u5\d
- is a sophisticated software engineering environment.
- It manages revision groups in a way similar to SCCS and CMS. Configurations
- are built using `configuration threads'.
- A configuration thread states which revision of each group
- named in a configuration should be chosen.
- A configuration thread may contain dynamic specifiers
- X(e.g., `choose the revisions I am currently working on,
- and the most recent revisions otherwise'), which are bound
- automatically at build time.
- It also provides a notification mechanism for alerting
- maintainers about the need to rebuild a system after a change.
- X.PP
- RCS is based on a general model for describing
- multi-version/multi-configuration systems\u11\d.
- The model describes systems using AND/OR graphs, where AND nodes represent
- configurations, and OR nodes represent version groups.
- The model gives rise to a suit of selection rules for
- composing configurations, almost all of which are implemented in RCS.
- The revisions selected by RCS are passed to MAKE for configuration building.
- Revision group management is modelled after SCCS.
- RCS retains SCCS's best features,
- but offers a significantly simpler user interface,
- flexible selection rules, adequate integration with MAKE
- and improved identification.
- A detailed comparison of RCS and SCCS appears in Reference 4.
- X.PP
- An important component of all revision control systems
- is a program for computing deltas.
- SCCS and RCS use the program \fIdiff\fR\u2\d,
- which first computes the longest common substring of two
- revisions, and then produces the delta from that substring.
- The delta is simply an edit script consisting of deletion and
- insertion commands that generate one revision from the other.
- X.PP
- A delta based on a longest common substring is not necessarily minimal,
- because it does not take advantage of crossing block moves.
- Crossing block moves arise if two or more blocks of lines
- X(e.g., procedures)
- appear in a different order in two revisions.
- An edit script derived from a longest common substring
- first deletes the shorter of the two blocks, and then reinserts it.
- Heckel\u12\d
- proposed an algorithm for detecting block moves, but
- since the algorithm is based on heuristics,
- there are conditions
- under which the generated delta is far from minimal.
- DSEE uses this algorithm combined with blank compression,
- apparently with satisfactory overall results.
- A new algorithm that is guaranteed to produce a minimal delta based on
- block moves appears in Reference 13.
- A future release of RCS will use this algorithm.
- X.PP
- X\fIAcknowledgements\fR:
- Many people have helped make RCS a success by contributed criticisms, suggestions,
- corrections, and even whole new commands (including manual pages).
- The list of people is too long to be
- reproduced here, but my sincere thanks for their help and
- goodwill goes to all of them.
- X.sp
- X.nr VS 12p
- X.vs 12p
- X.SH
- Appendix: Synopsis of RCS Operations
- X.LP
- X.IP "\fIci\fP \fB\- check in revisions\fP"
- X.sp 0
- X\fICi\fR stores the contents of a working file into the
- corresponding RCS file as a new revision.
- If the RCS file doesn't exist, \fIci\fR creates it.
- X\fICi\fR removes the working file, unless one of the options
- X\fI\-u\fR or \fI\-l\fR is present.
- XFor each check-in, \fIci\fR asks for a commentary
- describing the changes relative to the previous revision.
- X.sp 1
- X\fICi\fR assigns the revision number given by the \fI\-r\fR option;
- if that option is missing, it derives the number from the
- lock held by the user; if there is no lock and locking is not strict,
- X\fIci\fR increments the number of the latest revision on the trunk.
- A side branch can only be started by explicitly specifying its
- number with the \fI\-r\fR option during check-in.
- X.sp 1
- X\fICi\fR also determines
- whether the revision to be checked in is different from the
- previous one, and asks whether to proceed if not.
- This facility simplifies check-in operations for large systems,
- because one need not remember which files were changed.
- X.sp 1
- The option \fI\-k\fR searches the checked in file for identification
- markers containing
- the attributes
- revision number, check-in date, author and state, and assigns these
- to the new revision rather than computing them. This option is
- useful for software distribution: Recipients of distributed software
- using RCS should check in updates with the \fI\-k\fR option.
- This convention guarantees that revision numbers, check-in dates,
- etc., are the same at all sites.
- X.IP "\fIco\fP \fB\- check out revisions\fP"
- X.sp 0
- X\fICo\fR retrieves revisions according to revision number,
- date, author and state attributes. It either places the revision
- into the working file, or prints it on the standard output.
- X\fICo\fR always expands the identification markers.
- X.IP "\fIident\fP \fB\- extract identification markers\fP"
- X.sp 0
- X\fIIdent\fR extracts the identification markers expanded by \fIco\fR
- from any file and prints them.
- X.IP "\fIrcs\fP \fB\- change RCS file attributes\fP"
- X.sp 0
- X\fIRcs\fR is an administrative operation that changes access lists,
- locks, unlocks, breaks locks, toggles the strict-locking feature,
- sets state attributes and symbolic revision numbers, changes the
- description, and deletes revisions. A revision can
- only be deleted if it is not the fork of a side branch.
- X.IP "\fIrcsclean\fP \fB\- clean working directory\fP"
- X.sp 0
- X.ne 10
- X\fIRcsclean\fR removes working files that were checked out but never changed.*
- X.FS *
- The \fIrcsclean\fP and \fIrcsfreeze\fP commands
- are optional and are not always installed.
- X.FE
- X.IP "\fIrcsdiff\fP \fB\- compare revisions\fP"
- X.sp 0
- X\fIRcsdiff\fR compares two revisions and prints their
- difference, using the UNIX tool \fIdiff\fR.
- One of the revisions compared may be checked out.
- This command is useful for finding out about changes.
- X.IP "\fIrcsfreeze\fP \fB\- freeze a configuration\fP"
- X.sp 0
- X\fIRcsfreeze\fR assigns the same symbolic revision number
- to a given revision in all RCS files.
- This command is useful for accurately recording a configuration.*
- X.IP "\fIrcsmerge\fP \fB\- merge revisions\fP"
- X.sp 0
- X\fIRcsmerge\fR merges two revisions, \fIrev1\fR and \fIrev2\fR,
- with respect to a common ancestor.
- A 3-way file comparison determines the segments of lines that
- are (a) the same in all three revisions, or (b) the same in 2 revisions,
- or (c) different in all three. For all segments of type (b) where
- X\fIrev1\fR is the differing revision,
- the segment in \fIrev1\fR replaces the corresponding segment of \fIrev2\fR.
- Type (c) indicates an overlapping change, is flagged as an error, and requires user
- intervention to select the correct alternative.
- X.IP "\fIrlog\fP \fB\- read log messages\fP"
- X.sp 0
- X\fIRlog\fR prints the log messages and other information in an RCS file.
- X.bp
- X.LP
- X.nr VS 12p
- X.vs 12p
- X.]<
- X.ds [F 1
- X.]-
- X.ds [K FELD02
- X.ds [K MakeArticle
- X.ds [A Feldman, Stuart I.
- X.ds [D March 1979
- X.ds [T Make\*-A Program for Maintaining Computer Programs
- X.ds [J Software\*-Practice & Experience
- X.ds [V 9
- X.ds [N 3
- X.ds [P 255-265
- X.nr [P 1
- X.nr [T 0
- X.nr [A 1
- X.nr [O 0
- X.][ 1 journal-article
- X.ds [F 2
- X.]-
- X.ds [K HUNT01
- X.ds [T An Algorithm for Differential File Comparison
- X.ds [A Hunt, James W.
- X.as [A " and McIlroy, M. D.
- X.ds [I Computing Science Technical Report, Bell Laboratories
- X.ds [R 41
- X.ds [D June 1976
- X.nr [T 0
- X.nr [A 1
- X.nr [O 0
- X.][ 4 tech-report
- X.ds [F 3
- X.]-
- X.ds [K SCCS
- X.ds [A Rochkind, Marc J.
- X.ds [D Dec. 1975
- X.ds [T The Source Code Control System
- X.ds [J IEEE Transactions on Software Engineering
- X.ds [V SE-1
- X.ds [N 4
- X.ds [P 364-370
- X.nr [P 1
- X.nr [T 0
- X.nr [A 1
- X.nr [O 0
- X.][ 1 journal-article
- X.ds [F 4
- X.]-
- X.ds [K TICH08
- X.ds [T Design, Implementation, and Evaluation of a Revision Control System
- X.ds [A Tichy, Walter F.
- X.ds [B Proceedings of the 6th International Conference on Software Engineering
- X.ds [I ACM, IEEE, IPS, NBS
- X.ds [D September 1982
- X.ds [P 58-67
- X.nr [P 1
- X.nr [T 0
- X.nr [A 1
- X.nr [O 0
- X.][ 3 article-in-book
- X.ds [F 5
- X.]-
- X.ds [K LEBL01
- X.ds [A Leblang, David B.
- X.as [A " and Chase, Robert P.
- X.ds [T Computer-Aided Software Engineering in a Distributed Workstation Environment
- X.ds [O Proceedings of the ACM SIGSOFT/SIGPLAN Software Engineering Symposium
- X.as [O " on Practical Software Development Environments.
- X.ds [J SIGPLAN Notices
- X.ds [V 19
- X.ds [N 5
- X.ds [D May 1984
- X.ds [P 104-112
- X.nr [P 1
- X.nr [T 0
- X.nr [A 1
- X.nr [O 0
- X.][ 1 journal-article
- X.ds [F 1
- X.ds [F 3
- X.ds [F 6
- X.]-
- X.ds [K SCCSEval
- X.ds [A Glasser, Alan L.
- X.ds [D Nov. 1978
- X.ds [T The Evolution of a Source Code Control System
- X.ds [J Software Engineering Notes
- X.ds [V 3
- X.ds [N 5
- X.ds [P 122-125
- X.nr [P 1
- X.ds [O Proceedings of the Software Quality and Assurance Workshop.
- X.nr [T 0
- X.nr [A 1
- X.nr [O 1
- X.][ 1 journal-article
- X.ds [F 5
- X.ds [F 7
- X.]-
- X.ds [K IBMClearCaster
- X.ds [A Brown, H.B.
- X.ds [D 1970
- X.ds [T The Clear/Caster System
- X.ds [J Nato Conference on Software Engineering, Rome
- X.nr [T 0
- X.nr [A 1
- X.nr [O 0
- X.][ 1 journal-article
- X.ds [F 3
- X.ds [F 8
- X.]-
- X.ds [K HabermannSDC
- X.ds [A Habermann, A. Nico
- X.ds [D Jan. 1979
- X.ds [T A Software Development Control System
- X.ds [I Technical Report, Carnegie-Mellon University, Department of Computer Science
- X.nr [T 0
- X.nr [A 0
- X.nr [O 0
- X.][ 2 book
- X.ds [F 9
- X.]-
- X.ds [K CMS
- X.ds [A DEC
- X.ds [T Code Management System
- X.ds [I Digital Equipment Corporation
- X.ds [O Document No.\ EA-23134-82
- X.ds [D 1982
- X.nr [T 0
- X.nr [A 0
- X.nr [O 0
- X.][ 2 book
- X.ds [F 10
- X.]-
- X.ds [K LAMP01
- X.ds [A Lampson, Butler W.
- X.as [A " and Schmidt, Eric E.
- X.ds [T Practical Use of a Polymorphic Applicative Language
- X.ds [B Proceedings of the 10th Symposium on Principles of Programming Languages
- X.ds [I ACM
- X.ds [P 237-255
- X.nr [P 1
- X.ds [D January 1983
- X.nr [T 0
- X.nr [A 1
- X.nr [O 0
- X.][ 3 article-in-book
- X.ds [F 5
- X.ds [F 11
- X.]-
- X.ds [K TICH07
- X.ds [T A Data Model for Programming Support Environments and its Application
- X.ds [A Tichy, Walter F.
- X.ds [B Automated Tools for Information System Design and Development
- X.ds [E Hans-Jochen Schneider and Anthony I. Wasserman
- X.ds [C Amsterdam
- X.ds [I North-Holland Publishing Company
- X.ds [D 1982
- X.nr [T 0
- X.nr [A 1
- X.nr [O 0
- X.][ 3 article-in-book
- X.ds [F 4
- X.ds [F 2
- X.ds [F 12
- X.]-
- X.ds [K HECK01
- X.ds [T A Technique for Isolating Differences Between Files
- X.ds [A Heckel, Paul
- X.ds [J Communications of the ACM
- X.ds [D April 1978
- X.ds [V 21
- X.ds [N 4
- X.ds [P 264-268
- X.nr [P 1
- X.nr [T 0
- X.nr [A 0
- X.nr [O 0
- X.][ 1 journal-article
- X.ds [F 13
- X.]-
- X.ds [K TICH11
- X.ds [T The String-to-String Correction Problem with Block Moves
- X.ds [A Tichy, Walter F.
- X.ds [D Nov. 1984
- X.ds [J ACM Transactions on Computer Systems
- X.ds [V 2
- X.ds [N 4
- X.ds [P 309-321
- X.nr [P 1
- X.nr [T 0
- X.nr [A 1
- X.nr [O 0
- X.][ 1 journal-article
- X.]>
- END_OF_FILE
- if test 56906 -ne `wc -c <'rcs.ms'`; then
- echo shar: \"'rcs.ms'\" unpacked with wrong size!
- fi
- # end of 'rcs.ms'
- fi
- echo shar: End of archive 9 \(of 11\).
- cp /dev/null ark9isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 9 10 11 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 11 archives.
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-